<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <link rel="stylesheet" href="../../css/animate.css">
  <link rel="stylesheet" href="../../iconfont/iconfont.css">
  <link rel="stylesheet" href="../../css/mescroll.css">
  <link rel="stylesheet" href="../../css/gloab.css">
  <title>提现记录</title>
  <style>
    .form-son-input{
      line-height: 1rem;
      font-size:0.28rem;
    }
    .mescroll{
        position:fixed;
        top: 0;
        bottom: 0;
        height: auto;
        left:0;
        right:0;
    }
    .none-order{
      text-align: center;
      color:#727272;
      line-height: 200%;
      margin-top: 1rem;
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="public-header">
      <div id="statusbar"></div>
      <header class="public-header">
        <div class="public-header-lf iconfont icon-fanhui" @click="javascript:api.closeWin();"></div>
        <div class="public-header-title">提现记录</div>
      </header>
    </div>
    <div id="mescroll" class="mescroll">
      <div>
    <div class="zijinmx-body" v-if="cashdata&&cashdata.length>0">
      <div class="zijinmx-body-fr" v-for="(item,index) in cashdata">
        <div class="zijinmx-body-fr-head" style="font-size:0.3rem;">时间：{{item.create_time}}</div>
        <div class="flex" style="padding-top:0.24rem;">
          <div class="zijinmx-body-cz-ct F2" style="font-size:0.3rem;">
            <p>提现金额：<font style="color:#ff4d4d;">￥{{item.money}}</font></p>
            <p>实到金额：<font style="color:#ff4d4d;">￥{{item.real_money}}</font></p>
          </div>
          <div class="zijinmx-body-cz-rt F2" style="font-size:0.3rem;">
            <p style="color:#ff4d4d;"><font style="color:#3f4143;">提现服务费：</font>￥{{item.fee}}</p>
            <span style="color:#949b9f;" v-if="item.status==0"><span style="color:#3f4143;">状态：</span>{{item.status_text}}</span>
            <span style="color:#18bc9c;" v-if="item.status==1"><span style="color:#3f4143;">状态：</span>{{item.status_text}}</span>
            <span style="color:#e74c3c;" v-if="item.status==2"><span style="color:#3f4143;">状态：</span>{{item.status_text}}</span>
          </div>
        </div>
        <div class="" style="margin-top:0;color:#606162;width:100%;height:0.45rem;line-height:0.45rem;font-size:0.3rem;overflow:hidden;" v-if="item.message">
          <font style="color:#000;" v-if="item.status==2">不通过说明：</font>
          {{item.message}}
        </div>
      </div>
    </div>
   </div>
  </div>
    <div v-else class="none-order">
      <span>暂无数据</span>
    </div>
  </div>
  <div class="public-progress" style="z-index:9;">
   <img src="../../icon/icon150x150.png" alt="" class="animated infinite flash" style="width:200px;height:200px;display:block;margin:200px auto;">
  </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/jquery.js"></script>
<script src="../../script/mescroll.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/jsencrypt.js"></script>
<script src="../../script/fastclick.js"></script>

<script>
var vm;
var mescroll;
apiready=function(){
  api.removeLaunchView();
  setBar("statusbar");
  setFont(750);
  startVue();
  NewMescroll();
  var top=$("#public-header").outerHeight(true);
  $("#mescroll").css({"top":top+"px"});
  $(".public-progress").fadeOut(1000);
  setTimeout(function(){
    $(".public-progress").css({"display":"none"});
  },2000);
}
function startVue(){
  vm = new Vue({
    el:"#app",
    data:{
      gdtt:['100','1000','5000','10000','20000','50000'],
      num:3,
      cashdata:[],
      page:1,
      type:0,
    },
    created:function(){
        // this.tixian();
    },
    methods:{
      up:function(index){
        vm.type = index;
      },
      more:function(obj){
        if(obj.num){
          vm.page++;
        }else{
          vm.page=1;
          mescroll.lockUpScroll(false);
        }
        vm.tixian();
      },
      tixian:function(){
        api.ajax({
            url: apiUrl+'/api/user/withdrawLog',
            method: 'post',
            data: {
                values: {
                    token:$api.getStorage('token'),
                    page:vm.page,
                },
            }
        },function(ret, err){
			console.log(JSON.stringify(ret))
            if(vm.page==1){vm.cashdata=[];}
            if (ret.code==1) {
                // vm.cashdata=ret.data;
                for (var i = 0; i < ret.data.length; i++) {
                  vm.cashdata.push(ret.data[i]);
                }
            }else{
              if(vm.page!=1){
                msg("我也是有底线的！");
              }else{
                vm.cashdata = '';
                msg("暂无数据");
              }
              mescroll.lockUpScroll(true);
            }
            mescroll.endUpScroll(false);
            mescroll.endSuccess();
        });
      },
    }
  })
}
function NewMescroll(){
  mescroll = new MeScroll("mescroll", {
      down:{
        use:true,
        auto:true,
        // autoShowLoading:true,
        callback:vm.more, //下拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
      },
      up:{
        use:true,
        auto:false,
        lazyLoad: {
          use: true, // 是否开启懒加载,默认false
          attr: 'imgurl', // 网络地址的属性名 (图片加载成功会移除该属性): <img imgurl='网络图  src='占位图''/>
          showClass: 'mescroll-lazy-in', // 图片加载成功的显示动画: 渐变显示,参见mescroll.css
          delay: 500, // 列表滚动的过程中每500ms检查一次图片是否在可视区域,如果在可视区域则加载图片
          offset: 200 // 超出可视区域200px的图片仍可触发懒加载,目的是提前加载部分图片
        },
        callback:vm.more, //上拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
      }
    })
}
</script>
</html>
